package com.lagou.edu.utils;

/**
 * @author bwcx_jzy
 * @since 2021/10/21
 */
public final class StringUtils {

    /**
     * 判断字符串是否为空
     *
     * @param str 字符串
     * @return true 不为空
     */
    public static boolean hasLength(String str) {
        return (str != null && !str.isEmpty());
    }

    public static Class<?> classForName(String clsName) {
        Class<?> aClass;
        try {
            aClass = Class.forName(clsName);
        } catch (ClassNotFoundException e) {
            throw new IllegalArgumentException("not load class", e);
        }
        return aClass;
    }
}
